<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // instanceof：判断某个实例属不属于某个类

        // var arr=[1,2,3];
        // console.log(arr instanceof Array);//true
        // console.log(arr instanceof Date);//false
        // console.log(arr instanceof Object);//true

        function Fn(name,age){
           this.name=name;
           this.age=age;
        }
        let f = new Fn("lili",18)

        console.log(f instanceof Fn);//true
        console.log(f instanceof Array);//false
        console.log(f instanceof Date);//false
        console.log(f instanceof Object);//true
    </script>
</body>
</html>